<!DOCTYPE html>
<html lang="en">
<head>
    <title>Home</title>
    <link href="/static/index/css/font-awesome.min.css" rel="stylesheet" type="text/css" media="all"/>
    <!-- fontawesome -->
    <link href="/static/index/css/index.css" rel="stylesheet" type="text/css" media="all"/>
    <link href="/static/index/css/bootstrap.min.css" rel="stylesheet" type="text/css" media="all"/>
    <!-- Bootstrap stylesheet -->
    <link href="/static/index/css/style.css" rel="stylesheet" type="text/css" media="all"/>
    <link rel="stylesheet" href="/static/index/css/flexslider.css" type="text/css" media="screen" property=""/>

    <!-- stylesheet -->
    <!-- meta tags -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="keywords" content=""/>
    <script type="application/x-javascript"> addEventListener("load", function () {
        setTimeout(hideURLbar, 0);
    }, false);

    function hideURLbar() {
        window.scrollTo(0, 1);
    } </script>
    <!-- //meta tags -->
    <!--fonts-->
    <link href="http://fonts.googleapis.com/css?family=Roboto+Condensed:300,300i,400,400i,700,700i&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext,vietnamese"
          rel="stylesheet">
    <link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
    <!--//fonts-->
    <script type="text/javascript" src="/static/index/js/jquery-2.1.4.min.js"></script>
    <script src="/static/index/js/main.js"></script>
    <!-- Required-js -->
    <!-- main slider-banner -->
    <script src="/static/index/js/skdslider.min.js"></script>
    <link href="/static/index/css/skdslider.css" rel="stylesheet">
    <link href="/static/index/js/layui/css/layui.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/static/index/css/jquery.sinaEmotion.css"/>
    <link rel="stylesheet" type="text/css" href="/static/index/css/toastr.min.css"/>

    <script type="text/javascript" src="/static/index/js/jquery.sinaEmotion.js"></script>
    <script type="text/javascript">
        jQuery(document).ready(function () {
            jQuery('#demo1').skdslider({
                'delay': 5000,
                'animationSpeed': 2000,
                'showNextPrev': true,
                'showPlayButton': true,
                'autoSlide': true,
                'animationType': 'fading'
            });

            jQuery('#responsive').change(function () {
                $('#responsive_wrapper').width(jQuery(this).val());
            });

            $('#face').SinaEmotion($('.emotion'));

        });
    </script>
    <!-- //main slider-banner -->
    <!-- start-smoth-scrolling -->
    <script type="text/javascript" src="/static/index/js/move-top.js"></script>
    <script type="text/javascript" src="/static/index/js/easing.js"></script>
    <script type="text/javascript">
        jQuery(document).ready(function ($) {
            $(".scroll").click(function (event) {
                event.preventDefault();
                $('html,body').animate({scrollTop: $(this.hash).offset().top}, 1000);
            });
        });
    </script>
    <!-- start-smoth-scrolling -->

    <!-- scriptfor smooth drop down-nav -->
    <script>
        $(document).ready(function () {
            $(".dropdown").hover(
                function () {
                    $('.dropdown-menu', this).stop(true, true).slideDown("fast");
                    $(this).toggleClass('open');
                },
                function () {
                    $('.dropdown-menu', this).stop(true, true).slideUp("fast");
                    $(this).toggleClass('open');
                }
            );
        });
    </script>
    <!-- //script for smooth drop down-nav -->
</head>
<body>

<!--登录固定-->
<nav class="navbar  navbar-fixed-top" role="navigation" style="background: #e0620d ;padding-top: 3px;height:50px;">
    <div class="container-fluid" style="background: #fff;">
        <div class="navbar-header ">

            <a class="navbar-brand " href="{:url('/index/index/index')}">返回首页</a>


            <button type="button" class="navbar-toggle" data-toggle="collapse"
                    data-target="#my-navbar-collapse">
                <span class="sr-only">切换导航</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
        </div>
        <form class="navbar-form navbar-left" role="search" action="{:url('/wbSearch')}" method="post">
            <div class="form-group">
                <input type="text" class="form-control" name="Search" placeholder="微博找人">
                <button class="glyphicon glyphicon-search btn_search btn btn-default"></button>
                <!--  <button type="submit" class="btn btn-default">提交</button> -->
            </div>

        </form>

        <div class="collapse navbar-collapse" id="my-navbar-collapse">

            <ul class="nav navbar-nav navbar-right">
                <li style="margin-right: 20px">
                    <a href="{:url('index/dologin')}" style="color: black;padding: 0px!important;color: #ccc;" class="mingzi">个人首页</a>
                </li>
                
                <li><img src="{$photo}" width="30px" style="border-radius: 50%">

                    <!--判断为普通还是企业用户-->
                    <?php if ($role == 1) { ?>
                    <a href="{:url('index/cuser/index')}" style="color: black;padding: 0px!important;" class="mingzi">{$username}</a>
                    <?php }else{ ?>
                    <a href="{:url('index/buser/index')}" style="color: black;padding: 0px!important;" class="mingzi">{$username}</a>
                    <?php } ?>
                    <!--//判断为普通还是企业用户-->
                </li>

                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        安全中心<b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <a href="{:url('index/login/loginOut')}" class="roll-nav roll-right J_tabExit tuichu">

                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i
                                class="fa fa fa-sign-out"></i>
                            退出</a><br>

                        <a href="{:url('/editpass')}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;更改密码</a>

                    </ul>


                </li>
            </ul>
        </div>
    </div>
    <hr style="margin: 0;padding: 0;color:#222;width: 100%">
</nav>
<!--//登录固定-->
<!-- header -->
<header>
    <div class="w3layouts-top-strip" style="margin-top: 50px">
        <div class="container">
            <div class="logo">
                <h1 style="margin-top: 20px;"><a href="index.html">魔狗 微博</a></h1>
                <p>Miss you life</p>
            </div>
            <div class="w3ls-social-icons">
                <a class="facebook" href="#"><i class="fa fa-facebook"></i></a>
                <a class="twitter" href="#"><i class="fa fa-twitter"></i></a>
                <a class="pinterest" href="#"><i class="fa fa-pinterest-p"></i></a>
                <a class="linkedin" href="#"><i class="fa fa-linkedin"></i></a>
                <a class="linkedin" href="#"><i class="fa fa-google-plus"></i></a>
                <a class="linkedin" href="#"><i class="fa fa-rss"></i></a>
                <a class="linkedin" href="#"><i class="fa fa-behance"></i></a>
            </div>
        </div>
    </div>
    <!-- navigation -->
    <nav class="navbar navbar-default">
        <div class="container">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                        data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li><a class="active" href="{:url('index/index')}">热门</a></li>
                    {volist name="style" id="sty"}
                    <li><a class="active" href="{:url('index/about/'.$sty['id'])}">{$sty['style']}</a></li>
                    {/volist}
                    <li><a class="active" href="{:url('/index/talk')}">话题</a></li>


                </ul>
            </div><!-- /.navbar-collapse -->
            <div class="w3_agile_login">
                <div class="cd-main-header">
                    <a class="cd-search-trigger" href="#cd-search"> <span></span></a>
                    <!-- cd-header-buttons -->
                </div>
                <div id="cd-search" class="cd-search">
                    <form action="{:url('/wbSearch')}" method="post">
                        <input name="Search" type="search" placeholder="搜索微博/找人">
                    </form>
                </div>
            </div>
            <div class="clearfix"></div>
        </div><!-- /.container-fluid -->
    </nav>
    <!-- //navigation -->
</header>
<div class="container">
    <div>
        <!-- main-slider -->
        <div class="col-md-2"></div>
        <div class="col-md-8 btm-wthree-left">
            <div class="leave-coment-form">

                <form action="{:url('/index/send/sendweibo')}" method="post">


                    <textarea class="emotion" placeholder="请输入内容" name="content"></textarea>
                    <input id="face" type="button" value="表情" class="layui-btn"/>
                    <select name="style" id="" class="layui-btn">
                        {volist name='style' id ='sty'}
                        <option value="{$sty['id']}">{$sty['style']}</option>
                        {/volist}
                    </select>


                    <input name="path" id="thumbnail" type="hidden"/>


                    <button type="button" class="layui-btn" id="test1">
                        <i class="layui-icon">&#xe67c;</i>上传图片
                    </button>

                    <div class="input-group col-sm-3">
                        <div id="sm"></div>
                    </div>

                    <div class="w3_single_submit">
                        <input type="submit" value="发布" id="analytic">
                    </div>
                </form>
            </div>
        </div>
        <div class="col-md-2"></div>

    </div>

</div>
<div class="container">


    <div class="banner-btm-agile">
        <!-- //btm-wthree-left -->
        <div class="col-md-9 btm-wthree-left">

            {volist name="list" id="v"}
            {empty name="v['src_id']"}
            <div class="col-md-12" style="border: 1px solid #FFAC3A;width: 100% ;padding: 20px;">
                <div class="col-md-12">

                    <div class="col-md-1">


                        <div class="comments-grid-left">
                            <a href="{:url('/tourists')}?id={$v['uid']}"><img src="{$v['photo']}" style="width: 48px;height: 48px;"/></a>

                        </div>
                    </div>
                    <div class="col-md-11" style="margin-bottom: 10px;">
                        <br>
                        <h5 style="margin-left:50px;font-size: 16px;color:#FFAC3A;"><a href="{:url('/tourists')}?id={$v['uid']}">{$v['username']}</a></h5>
                        <p style="font-size: 12px;">{$v['time']}</p>
                        <br>
                        <p>{$v['content']}</p>
                        <!--</div>-->

                        <!--<br>-->
                        <ul class="slides col-md-4" style="margin-top: 10px;">
                            {foreach $list[$key]['path'] as $data}
                            <li>
                                <div class="w3agile_special_deals_grid_left_grid">
                                    <a href="{:url('index/show/index',['id'=>$v['id']])}"><img src="{$data['path']}" class="img-responsive" alt=""
                                                                   width="780" style="height: 200px!important"/></a>
                                </div>
                            </li>
                            {/foreach}
                        </ul>
                    </div>

                </div>
                <div class="col-md-1"></div>
                <div class="col-md-11">
                    <ul class="col-md-6">
                        <li data-toggle="modal" data-target="#exampleModal" style="float: left; margin-left:10px;"><a><i
                                class="fa fa-share turn-btn" aria-hidden="true" data-id="{$v['id']}"> &nbsp;
                            {$v['transpondnum']}</i> </a></li>
                        <li style="float: left; margin-left:10px;"><a><i class="fa fa-thumbs-up agree-btn"
                                                                         aria-hidden="true" data-id="{$v['id']}"> &nbsp;
                            {$v['agreenum']}</i></a></li>
                        <li data-toggle="modal" data-target="#exampleModal" style="float: left; margin-left:10px;"><a><i
                                class="fa fa-comment com-btn" aria-hidden="true" data-id="{$v['id']}"> &nbsp;
                            {$v['commentnum']}</i></a></li>
                    </ul>
                    <div class="clearfix"></div>
                    <div class="col-md-6">
                        <a class="agileits w3layouts" href="{:url('index/show/index',['id'=>$v['id']])}">查看评论 <span
                                class="glyphicon agileits w3layouts glyphicon-arrow-right"
                                aria-hidden="true"></span></a>
                    </div>
                </div>
            </div>

            <div class="clearfix"></div>
            <br><br>
            {else /}
            <!--<div class="col-md-9 btm-wthree-left">-->
                <div class="col-md-12" style="border: 1px solid #FFAC3A;width: 100% ;padding: 20px;">
                    <div class="col-md-12">
                        <div class="col-md-4 w3agile-left">
                            <div class="comments-grid-left">
                                <a href="{:url('/tourists')}?id={$v['uid']}"><img src="{$v['photo']}" style="width: 48px;height: 48px;"/></a>
                            </div>
                            <h5 style="margin-left:110px;font-size: 16px;color:#FFAC3A;"><a href="{:url('/tourists')}?id={$v['uid']}">{$v['username']}</a></h5>

                            <p style="font-size: 12px;margin-left: 60px;">{$v['time']}</p>
                            <p style="margin-left: 100px">转发微博</p>

                        </div>
                        <div class="col-md-8 w3agile-right" style="margin: 0 auto;">
                            <p>{:replace_weibo($v['content'])}</p>

                        </div>
                        <ul class="slides col-md-4" style="margin-top: 10px;">
                            {foreach $list[$key]['path'] as $data}
                            <li>
                                <div class="w3agile_special_deals_grid_left_grid">
                                    <a href="{:url('index/show/index',['id'=>$v['id']])}"><img src="{$data['path']}" class="img-responsive" alt=""
                                                                                               width="780" style="height: 200px!important"/></a>
                                </div>
                            </li>
                            {/foreach}
                        </ul>
                    </div>
                    <div class="col-md-12" style="background: #eee">

                        <div class="col-md-1" >

                            <div class="comments-grid-left">
                                <a href="{:url('/tourists')}?id={$v['old']['uid']}"><img src="{$v['old']['photo']}" style="width: 48px;height: 48px;"/></a>
                            </div>
                        </div>
                        <div class="col-md-11" >
                            <br>
                            <h5 style="margin-left:50px;font-size: 16px;"><a href="{:url('/tourists')}?id={$v['old']['uid']}">{$v['old']['username']}</a></h5>
                            <p style="font-size: 12px;">{$v['time']}</p>
                            <br>
                            <p>{:replace_weibo($v['old']['content'])}</p>
                            <!--</div>-->

                            <!--<br>-->
                            <ul class="slides col-md-4" style="margin-top: 10px;">

                                <li>
                                    <div class="w3agile_special_deals_grid_left_grid">
                                        {empty name="v['old']['path']"}
                                        {else /}

                                        <a href="{:url('index/show/index',['id'=>$v['id']])}"><img src="{$v['old']['path']}" class="img-responsive"
                                                                       alt=""
                                                                       width="780" style="height: 200px!important"/></a>
                                        {/empty}
                                    </div>
                                </li>

                            </ul>
                        </div>

                    </div>
                    <div class="col-md-12"  style="background: #eee">
                        <div class="col-md-1">
                        </div>
                        <div class="col-md-11">
                            <ul class="col-md-6">
                                <li data-toggle="modal" data-target="#exampleModal" style="float: left; margin-left:10px;"><a><i
                                        class="fa fa-share turn-bt" aria-hidden="true" data-id="{$v['old']['id']}"> &nbsp;
                                    {$v['transpondnum']}</i> </a></li>
                                <li style="float: left; margin-left:10px;"><a><i class="fa fa-thumbs-up agree-btn"
                                                                                 aria-hidden="true" data-id="{$v['id']}"> &nbsp;
                                    {$v['agreenum']}</i></a></li>
                                <li data-toggle="modal" data-target="#exampleModal" style="float: left; margin-left:10px;"><a><i
                                        class="fa fa-comment com-bt" aria-hidden="true" data-id="{$v['id']}"> &nbsp;
                                    {$v['commentnum']}</i></a></li>
                            </ul>
                            <div class="clearfix"></div>
                            <div class="col-md-6">
                                <a class="agileits w3layouts" href="{:url('index/show/index',['id'=>$v['old']['id']])}">查看评论 <span
                                        class="glyphicon agileits w3layouts glyphicon-arrow-right"
                                        aria-hidden="true"></span></a>
                            </div>
                        </div>
                    </div>
                </div>
            <hr>
            <br>
                    {/empty}
                    {/volist}
                    <br>
                    <br>
                <!--</div>-->
            </div>

        </div>
        <!-- //btm-wthree-left -->
        <!-- btm-wthree-right -->


        <div class="col-md-3 w3agile_blog_left">
            <div class="wthreesearch">
                <form action="{:url('/wbSearch')}" method="post">
                    <input type="search" name="Search" placeholder="Search here" required="">
                    <button type="submit" class="btn btn-default search" aria-label="Left Align">
                        <i class="fa fa-search" aria-hidden="true"></i>
                    </button>
                </form>

            </div>


            <div class="w3ls_popular_posts">
                <h3>魔狗新闻</h3>
                {volist name="data1" id="v" offset="0" length='3'}


                <div class="agileits_popular_posts_grid" id="a">
                    <div class="w3agile_special_deals_grid_left_grid">
                        <a href="{$v['url']}" target="_blank"><img src="{$v['thumbnail_pic_s']}" class="img-responsive"
                                                                   alt=""/></a>
                    </div>

                    <h4><a href="{$v['url']}" target="_blank">{$v['title']}</a></h4>

                    <h5><i class="fa fa-calendar" aria-hidden="true"></i>{$v['date']}</h5>
                </div>


                {/volist}
            </div>

            <div class="w3l_categories">
                <h3>热门话题</h3>
                <ul>
                    {volist name='res' id='re'}
                    <li><a href="{:url('index/talk/index', ['id'=>$re['id']])}"><span
                            class="glyphicon glyphicon-arrow-right" aria-hidden="true"></span>{$re['name']}</a></li>
                    {/volist}
                </ul>
            </div>
            <div class="w3ls_recent_posts">
                <h3>商业推荐</h3>
                {volist name='banner' id='ban'}
                <div class="agileits_recent_posts_grid">
                    <div class="agileits_recent_posts_gridl">
                        <div class="w3agile_special_deals_grid_left_grid">
                            <a href="{$ban['link']}" target="_blank"><img src="{$ban['path']}" class="img-responsive"
                                                                          alt=""/></a>
                        </div>
                    </div>
                    <div class="agileits_recent_posts_gridr">
                        <h4><a target="_blank" href="{$ban['link']}">{$ban['title']}</a></h4>

                    </div>
                    <div class="clearfix"></div>
                </div>
                {/volist}
            </div>
            <div class="w3l_tags">
                <h3>分类</h3>
                <ul class="tag">

                    {volist name="style" id="sor"}
                    <li><a href="{:url('index/about/'.$sor['id'])}">{$sor['style']}</a></li>

                    {/volist}
                </ul>
            </div>
        </div>
        <!-- //btm-wthree-right -->

        <div class="clearfix"></div>
    </div>
</div>

<!-- footer -->
<div class="footer-agile-info">
    <div class="container">
        <div class="col-md-4 w3layouts-footer">
            <h3>联系信息</h3>
            <p><span><i class="fa fa-map-marker" aria-hidden="true"></i></span>中华人民共和国上海市徐汇区</p>
            <p><span><i class="fa fa-envelope" aria-hidden="true"></i></span><a href="#">1551941489@qq.com</a></p>
            <p><span><i class="fa fa-mobile" aria-hidden="true"></i></span>P: 03765759119 </p>
            <p><span><i class="fa fa-globe" aria-hidden="true"></i></span><a href="http://www.zhc1995.cn">W:
                www.zhc1995.cn</a></p>
        </div>
        <div class="col-md-4 wthree-footer">
            <h2>网站简介</h2>
            <p>本网站纯属娱乐,如作商业用途,请联系本人</p>
        </div>
        <div class="col-md-4 w3-agile">
            <h3>意见反馈</h3>
            <p>如果您有好的提议,前邮件联系作者</p>

        </div>
    </div>
</div>
<!-- footer -->
<!-- copyright -->
<div class="copyright">
    <div class="container">
        <div class="w3agile-list">
            <ul>
                <li><a class="active" href="{:url('index/index')}">热门</a></li>
                {volist name="style" id="sty"}
                <li><a class="active" href="{:url('index/about/'.$sty['id'])}">{$sty['style']}</a></li>
                {/volist}
                <li><a class="active" href="index.html">话题</a></li>
            </ul>
        </div>
        <div class="agileinfo">
            <p>版权 &copy; 魔狗工作室保留一切版权<a target="_blank" href="http://www.baidu.com">魔狗工作室</a>备案号:19001432</p>
        </div>
    </div>
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    已点赞
                </h4>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>


<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="exampleModalLabel">转发</h4>
            </div>
            <div class="modal-body">
                <form>
                    <div class="form-group">
                        <label for="recipient-name" class="control-label">原微博</label>
                        <div class="username"></div>
                        <div class="form-control old" id="message-text"
                             style="border: solid #ccc 1px;height: 50px;overflow: hidden;"></div>
                        <input type="text" name="mid" value="" class="mid" hidden>
                    </div>
                    <div class="form-group">
                        <label for="message-text" class="control-label ">你的意见</label>
                        <textarea class="form-control new" id="message-text"></textarea>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default clos" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary turn">转发</button>
                <button type="button" class="btn btn-primary commen" style="display: none">评论</button>

            </div>
        </div>
    </div>
</div>


<!-- //copyright -->

<script src="/static/index/js/layui/layui.js"></script>
<script src="/static/index/js/toastr.min.js"></script>
<script src="/static/index/js/index.js"></script>

<!-- here stars scrolling icon -->

<script type="text/javascript">
    // $(document).ready(function () {
    //     /*
    //         var defaults = {
    //         containerID: 'toTop', // fading element id
    //         containerHoverID: 'toTopHover', // fading element hover id
    //         scrollSpeed: 1200,
    //         easingType: 'linear'
    //         };
    //     */

    //     $().UItoTop({easingType: 'easeOutQuart'});
    //     $('.jump').click(function () {
    //         var name = $(this).attr('data-name');
    //         // var name = 1111;
    //         // console.log("{:url('/index/talk/name')}?name='"+name+"'");
    //         window.location.href = "{:url('/index/talk/name')}?name='" + name + "'";
    //     });

    //     //点击转发形式微博的转发按钮
    //     $('.turn-bt').click(function(){
    //         var content = $(this).parent().parent().parent().parent().parent().prev().children().next().children().next().next().next().next().html();
    //         var username = $(this).parent().parent().parent().parent().parent().prev().children().next().children().next().html();
    //         // console.log(username);
    //         var mid = $(this).attr('data-id');
    //         console.log(mid);
    //         $('.old').html(content);
    //         $('.mid').val(mid);
    //         $('.username').html(username + ' : ');
    //         $('.turn').show();
    //         $('.commen').hide();
    //         $('#exampleModalLabel').html('转发');
    //         $('.new').val(' ');
    //     });

    //     //点击转发形式微博的评论按钮
    //     $('.com-bt').click(function(){
    //         var content = $(this).parent().parent().parent().parent().parent().prev().children().next().children().next().next().next().next().html();
    //         var username = $(this).parent().parent().parent().parent().parent().prev().children().next().children().next().html();
    //         // console.log(username);
    //         var mid = $(this).attr('data-id');

    //         $('.old').html(content);
    //         $('.mid').val(mid);
    //         //改变转发按钮为评论按钮
    //         $('.turn').hide();
    //         $('.commen').show();
    //         $('.username').html(username + ' : ');
    //         $('.new').val(' ');
    //         $('#exampleModalLabel').html('评论');
    //     });




    //     //转发按钮
    //     $('.turn-btn').click(function () {
    //         var content = $(this).parent().parent().parent().parent().prev().prev().children().children().next().next().next().next().html();
    //         var username = $(this).parent().parent().parent().parent().prev().prev().children().children().next().html();
    //         var mid = $(this).attr('data-id');
    //         // console.log(content);
    //         $('.old').html(content);
    //         $('.mid').val(mid);
    //         $('.username').html(username + ' : ');
    //         $('.turn').show();
    //         $('.commen').hide();
    //         $('#exampleModalLabel').html('转发');
    //         $('.new').val(' ');

    //     });
    //     //点击转发
    //     $('.turn').click(function () {
    //         var oldContent = $('.old').val();
    //         var mid = $('.mid').val();
    //         var content = $('.new').val();

    //         $('.clos').click();
    //         // console.log(oldContent,mid,content);
    //         //执行ajax
    //         $.ajax({
    //             type: 'post',
    //             url: "/index/send/turn",
    //             contentType: 'application/x-www-form-urlencoded;charset=utf-8',
    //             data: {src_id: mid, content: content},
    //             dataType: 'json',
    //             success: function (data) {
    //                 // console.log(data);
    //                 if (data) {

    //                     toastr.success('转发成功', '牛皮!:');
    //                 } else {

    //                     toastr.error('转发失败了', '不好意思哈: ');
    //                 }
    //             },
    //             error: function () {
    //                 toastr.error('AJAX 执行错误!', '警告:');
    //             }
    //         });


    //     });

    //     //点击评论
    //     $('.com-btn').click(function () {
    //         var content = $(this).parent().parent().parent().parent().prev().prev().children().children().next().next().next().next().html();
    //         var username = $(this).parent().parent().parent().parent().prev().prev().children().children().next().html();
    //         var mid = $(this).attr('data-id');
    //         $('.old').html(content);
    //         $('.mid').val(mid);
    //         //改变转发按钮为评论按钮
    //         $('.turn').hide();
    //         $('.commen').show();
    //         $('.username').html(username + ' : ');
    //         $('.new').val(' ');
    //         $('#exampleModalLabel').html('评论');
    //     })
    //     //点击评论按钮
    //     $('.commen').click(function () {
    //         var oldContent = $('.old').val();
    //         var mid = $('.mid').val();
    //         var content = $('.new').val();

    //         $('.clos').click();
    //         // console.log(oldContent,mid,content);
    //         //执行ajax
    //         $.ajax({
    //             type: 'post',
    //             url: "/index/content/content",
    //             contentType: 'application/x-www-form-urlencoded;charset=utf-8',
    //             data: {mid: mid, content: content},
    //             dataType: 'json',
    //             success: function (data) {
    //                 // console.log(data);
    //                 if (data) {
    //                     $('.new').val('');
    //                     toastr.success('已评论', '牛皮!:');
    //                 } else {
    //                     toastr.error('评论失败了', '不好意思哈: ');
    //                 }
    //             },
    //             error: function () {
    //                 toastr.error('AJAX 执行错误!', '警告:');
    //             }
    //         });
    //     });

    // });


    // 上传图片
    $(document).ready(function () {


        layui.use('upload', function () {
            var upload = layui.upload;

            //执行实例
            var uploadInst = upload.render({
                elem: '#test1' //绑定元素
                , url: "{:url('send/uploadImg')}" //上传接口
                , done: function (res) {
                    //上传完毕回调
                    $("#thumbnail").val(res.data.src);
                    $("#sm").html('<img src="' + res.data.src + '" style="width:40px;height: 40px;"/>');
                }
                , error: function () {
                    //请求异常回调
                }
            });
        });
    });

    // toastr.options = {
    //     closeButton: true,// 是否显示关闭按钮
    //     progressBar: true,// 实现显示计时条
    //     timeOut: "1000",  // 自动关闭时间
    //     positionClass: "toast-bottom-left" // 提示位置
    //     // toast-top-full-width 顶端，宽度铺满整个屏幕
    //     // toast-top-right  顶端右边
    // };

    // $(function () {
    //     // 触发点赞操作
    //     $('.agree-btn').click(function () {

    //         var mid = $(this).attr('data-id');
    //         // $(this).text('11111');
    //         res = $(this);

    //         $.ajax({
    //             type: 'get',
    //             url: "/index/send/agree/" + mid,
    //             dataType: 'json',
    //             success: function (data) {
    //                 // console.log(data);
    //                 if (data[0] == 1) {
    //                     toastr.success('已赞');
    //                     // console.log(res);
    //                     res.html(' &nbsp; ' + data[1]);
    //                 } else if (data[0] == 0) {
    //                     toastr.error('最多只能赞一次哦', '不好意思哈: ');
    //                 } else if (data[0] == 2) {
    //                     window.location.href = "{:url('login/index')}";
    //                 }
    //             },
    //             error: function () {

    //                 toastr.error('AJAX 执行错误!', '警告:');
    //             }
    //         });

    //         //触发转发操作
    //     });

    //     //
    //     // $('.show-btn').click(function () {
    //     //     var ac_id = $(this).attr('data-id');
    //     //     console.log('查询ID为: ' + ac_id);
    //     //     //  执行查询
    //     //     showAjax(ac_id);
    //     // });

    // });


</script>
<!-- //here ends scrolling icon -->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="/static/index/js/bootstrap.js"></script>
</body>
</html>

